package com.flydust.apipulse.repository;

import com.flydust.apipulse.entity.HealthCheckResult;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HealthCheckResultRepository extends JpaRepository<HealthCheckResult, Long> {
    List<HealthCheckResult> findByEndpointIdOrderByCheckedAtDesc(Long endpointId);
    
    List<HealthCheckResult> findTop10ByEndpointIdOrderByCheckedAtDesc(Long endpointId);
}